<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="fragments/custom_base::commonHead"></th:block>
    <th:block th:replace="fragments/custom_link::home-css"></th:block>
    <link rel="stylesheet" href="/libs/editor/css/editormd.min.css" />
    <th:block th:replace="fragments/custom_link::home-js"></th:block>
    <style>
        .editormd-html-preview, .editormd-preview-container{
            width: auto !important;
            min-height: 200px;
        }
    </style>
</head>
<body>
<th:block th:replace="fragments/custom_base::commonNav"></th:block>

<div class="node-box">
    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-col-md-offset2 layui-col-sm-offset2 layui-col-md8 layui-col-sm8">
                <div class="node-content">
                    <div class="node-title">
                        <h1 th:text="${webNav.name}"></h1>
                    </div>
                    <div class="markdown-content" id="editormd-view">
                        <textarea style="display:none;" name="editormd-markdown-doc" th:utext="${webNav.content?:'暂无内容，请联系管理员添加该信息~'}"></textarea>
                    </div>
                    <div class="node-footer">
                        <span th:text="${'创建时间：' + #dates.format(webNav.createdAt, 'yyyy-MM-dd HH:mm:ss')}"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/libs/editor/editormd.min.js"></script>
<script src="/libs/editor/lib/marked.min.js"></script>
<script src="/libs/editor/lib/prettify.min.js"></script>
<script th:inline="javascript">
    $(function() {
        let vartestEditormdView = editormd.markdownToHTML("editormd-view");
    });
</script>
<th:block th:replace="fragments/custom_base :: commonFooter"></th:block>
</body>
<th:block th:replace="fragments/custom_base :: commonScript"></th:block>
</html>